package org.csu.code.api.service;

import org.csu.code.api.common.CommonResponse;
import org.csu.code.api.entity.Order;
import org.csu.code.api.vo.OrderVO;
import org.csu.code.api.vo.typeVO;

import java.util.List;

public interface OrderService {
    CommonResponse<List<OrderVO>> getOrdersByUserId(int userId);

    CommonResponse<OrderVO> getOrderByOrderId(int orderId);

    CommonResponse<OrderVO> addOrder(OrderVO orderVO);

    CommonResponse<List<OrderVO>> searchOrderList(String keyword);

    OrderVO orderToOrderVO(Order order);

    CommonResponse<String> changeOrderStatus(int orderId, typeVO type);

    public int getNextId(String name);

}
